<template>
  <div id="capitalanalysis">
    <router-link to="/index"><img class="gone" src="@/assets/img/housedetail/img04.png" alt="" /></router-link>
    <div class="content">
      <img style="width:10.8rem" src="@/assets/img/threezi/img11.png" alt="" />
      <!-- <a-input-search class="search-input mt60" placeholder="请输入搜索关键字" size="large" @search="onSearch">
        <a-button type='primary' slot="enterButton">
          <a-icon type="search" />搜索
        </a-button>
      </a-input-search> -->
      <menubox top="1rem" left="0.8rem" @handelClick="handelClick" />
      <a-table class="table mt80" :scroll="{ y: clientHeight - 260  }" :pagination="false" :columns="columns"
        :rowKey="(record) => record.id" :data-source="filterData">
        <div class="table-num" slot="dataindex" slot-scope="text, record, index">
          {{ index+1}}
        </div>
        <div class="CS" slot="jmoney" slot-scope="text, record">
          {{ text }}
        </div>
        <div class="FF" slot="dmoney" slot-scope="text, record">
          {{ text }}
        </div>
        <div class="QS" slot="abstract" slot-scope="text, record">
          {{ text }}
        </div>
      </a-table>
    </div>
  </div>
</template>

<script>
import axios from "axios";
import { post, get } from "@/utils/axios";

import menubox from "@/components/detail/menubox";
export default {
  name: "capitalanalysis",
  components: { menubox },
  data() {
    return {
      clientHeight:
        window.innerHeight ||
        document.documentElement.clientHeight ||
        document.body.clientHeight,
      columns: [
        {
          title: "序号",
          dataIndex: "dataindex",
          key: "dataindex",
          scopedSlots: { customRender: "dataindex" }
        },
        {
          title: "单位代码",
          dataIndex: "money",
          key: "money"
        },
        {
          title: "凭证号",
          dataIndex: "name",
          key: "name"
        },
        {
          title: "凭证日期",
          dataIndex: "type",
          key: "type"
        },
        {
          title: "凭证类型",
          dataIndex: "relatives",
          key: "relatives"
        },
        {
          title: "科目代码",
          dataIndex: "status",
          key: "status"
        },
        {
          title: "记账日期",
          dataIndex: "units",
          key: "units"
        },
        {
          title: "附件张数",
          dataIndex: "position",
          key: "position",
          align: "center"
        },
        {
          title: "输入人",
          dataIndex: "wpeople",
          key: "wpeople"
        },
        {
          title: "审核人",
          dataIndex: "speople",
          key: "speople"
        },
        {
          title: "记账人",
          dataIndex: "jpeople",
          key: "jpeople"
        },
        {
          title: "借方数量",
          dataIndex: "jnum",
          key: "jnum"
        },
        {
          title: "贷方数量",
          dataIndex: "dnum",
          key: "dnum"
        },
        {
          title: "借方金额/元",
          dataIndex: "jmoney",
          key: "jmoney",
          scopedSlots: { customRender: "jmoney" }
        },
        {
          title: "贷方金额/元",
          dataIndex: "dmoney",
          key: "dmoney",
          scopedSlots: { customRender: "dmoney" }
        },
        {
          title: "摘要",
          dataIndex: "abstract",
          key: "abstract",
          ellipsis: true,
          width: "18%",
          scopedSlots: { customRender: "abstract" }
        }
      ],
      filterData: [],
      tableData: [
        {
          id: "1",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71000",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "2",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71002",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "3",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71003",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "7100",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "7100",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "23213",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71004",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710535",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71053",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710687",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71098",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71075",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710645",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710643",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "7100",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710634",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71034",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71009",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71034",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710432",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "7105345",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71053",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710432",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710543",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "71064",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710645",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710435",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710543",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710034",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "7100",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "710423",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        },
        {
          id: "4",
          lat: "120.1608187",
          lng: "30.29264623",
          name: "林地",
          type: "杭州XXX",
          money: "7100534",
          status: "使用中",
          relatives: "233㎡",
          units: "20万元",
          position: "是",
          color: "红灯",
          wpeople: "刘XX",
          speople: "张XX",
          jpeople: "万XX",
          jnum: "3",
          dnum: "3",
          jmoney: "2000",
          dmoney: "2000",
          abstract: "2020年7月30日与陈主任一行15人一起去山上唱歌一直唱歌"
        }
      ]
    };
  },
  created() {},
  mounted() {
    // console.log(fetch(),999);

    this.filterData = this.tableData;
    window.onresize = () => {
      this.clientHeight =
        window.innerHeight ||
        document.documentElement.clientHeight ||
        document.body.clientHeight;
      console.log(this.clientHeight);
    };
  },
  destroyed() {
    // this.timer = null;
  },
  methods: {
    handelClick(value) {
      console.log(value);
      if (!value) {
        this.filterData = this.tableData;
      } else {
        this.filterData = this.tableData.filter(
          e => e.money.indexOf(value) != -1
        );
      }
    }
  }
};
</script>

<style lang="scss">
#capitalanalysis {
  text-align: center;
  width: 100%;
  height: 100%;
  background: rgb(10, 28, 49);
  padding: 0.5rem 0.1rem 0.1rem;
  box-sizing: border-box;
  .content {
    height: 100%;
    padding: 0px 0.66rem 0.1rem;
    box-sizing: border-box;
    background: url(../assets/img/threezi/img10.png) center no-repeat;
    background-size: 100% 100%;
  }
  .gone {
    cursor: pointer;
    width: 0.64rem;
    height: 0.64rem;
    position: fixed;
    top: 0.18rem;
    right: 0.28rem;
  }
}
</style>
